<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
cfc('core')->checklogin();
$return=array();

$return['item']=pdo_get('core_members',array('id'=>$_SESSION['uid'],'uniacid'=>$_SESSION['uniacid']),array('credit1','credit2','mobile','groupid','avatar','nickname'));
if(!$return['item']){
	$_SESSION['uid']=false;
	exi('找不到会员信息！请先登陆！','error');
}
if($return['item']['groupid']){
	$return['item']['group']=pdo_getcolumn('core_member_groups',array('id'=>$return['item']['groupid'],'uniacid'=>$_SESSION['uniacid']),'title');
}else{
	$return['item']['group']='普通会员';
}
$setting=uni_setting('member_setting');
$return['item']['sign']=$setting['sign']['open'];
$return['item']['tixians']=$setting['member']['tixians'];
$return['htmls']=array(
	'title'=>'会员中心',
	'list'=>array(
		array('type'=>'member_info','set'=>'core/member.set/','left_title'=>'余额','left_submit'=>'充值','left_field'=>'credit2','left_url'=>'core/member.recharge/','mid_url'=>'core/member.cavatar/','avatar_field'=>'avatar','group_field'=>'group','right_title'=>'积分','right_field'=>'credit1'),
		array('type'=>'menu_list','list'=>array(
			array('url'=>'core/member.mobile/','title'=>'绑定手机号','icon'=>'fa-phone-square','remark'=>''),
		)),
		array('type'=>'menu_list','list'=>array(
			array('url'=>'core/member.card/','title'=>'我的优惠券','icon'=>'fa-credit-card','remark'=>''),
		)),
		array('type'=>'menu_list','show'=>array('tixians'=>1),'list'=>array(
			array('url'=>'core/member.tixian/','title'=>'余额提现','icon'=>'fa-money','remark'=>''),
		)),
		array('type'=>'menu_list','list'=>array(
			array('url'=>'core/member.credit_log/','title'=>'积分日志','icon'=>'fa-list','remark'=>''),
		)),
		array('type'=>'menu_list','show'=>array('sign'=>1),'list'=>array(
			array('url'=>'core/member.qiandao/','title'=>'签到','icon'=>'fa-list','remark'=>''),
		)),
		array('type'=>'menu_list','list'=>array(
			array('url'=>'core/member.address/','title'=>'收货地址管理','icon'=>'fa-map-marker','remark'=>''),
		)),
		array('type'=>'submit_list','list'=>array(
			array('url'=>'core/member.cpassword/','title'=>'修改密码'),
			array('url'=>'core/member.logout/','title'=>'退出登陆','title_color'=>'#fff','background'=>'#ff5555'),
		)),
	),
	/*'menu'=>array('icon_color'=>'red','title_color'=>'gree','list'=>array(
		array('title'=>'首页','icon'=>'icon-shouye','url'=>'core/home.welcome/'),
	)),*/
);
set_html('title','会员中心');
exi($return);